//
//  EditMyCarViewController.m
//  PeopleStreet
//
//  Created by 刘建峰 on 16/7/8.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "EditMyCarViewController.h"
#import "MyCarsTableViewCell.h"

static NSString * cellIndentfier = @"MyCarsTableViewCell";


@interface EditMyCarViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (weak, nonatomic) IBOutlet UIView *navView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation EditMyCarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViewLayout];
    // Do any additional setup after loading the view.
}

- (void)initViewLayout{
    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    
    
    [self.tableView registerNib:[UINib nibWithNibName:cellIndentfier bundle:nil] forCellReuseIdentifier:cellIndentfier];
    
    _tableView.dataSource = self;
    _tableView.delegate = self;

    
}

#pragma mark  ==== 删除
- (IBAction)deletedHandel:(id)sender {
}

- (IBAction)back:(id)sender {
    [self.navigationController  popViewControllerAnimated:YES];
}
#pragma mark   ==== tableViewDatasource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 47*VerticalRatio();
    
    
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    MyCarsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndentfier];
    if (cell == nil) {
        cell= [[MyCarsTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentfier];
    }
    
    cell.choseButton.hidden = NO;
    cell.carNumber.frame = flexibleFrame(CGRectMake(50, 0, 250, 47), NO);
    cell.setButton.hidden = YES;
    
    cell.choseBlock = ^(){
        
    };
    
    //        NSDictionary * dic = _listArray[indexPath.row];
    //
    //        cell.superTitle.text  = [NSString stringWithFormat:@"%@",dic[@"mmdeName"]];
    //        cell.superDetail.text  = [NSString stringWithFormat:@"%@",dic[@"mmdeContent"]];
    //        cell.time.text = [ NSString stringWithFormat:@"%@",dic[@"mmdeCreateTime"]];
    //        if ([NSString stringWithFormat:@"%@",dic[@"mmdeCreateTime"] ].length>0) {
    //            cell.time.text = [Common updateTimeForData:[NSString stringWithFormat:@"%@",dic[@"mmdeCreateTime"] ]];
    //        }
    //
    return cell;
    
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
